As is known, there are a variety of types of magnetic field sensing elements, including, but not limited to, Hall effect elements, magnetoresistance elements, and magnetotransistors. As is also known, there are different types of Hall effect elements, for example, planar Hall elements, vertical Hall elements, and circular Hall elements. As is also known, there are different types of magnetoresistance elements, for example, anisotropic magnetoresistance (AMR) elements, giant magnetoresistance (GMR) elements, tunneling magnetoresistance (TMR) elements, Indium antimonide (InSb) elements, and magnetic tunnel junction (MTJ) elements.
Hall effect elements generate an output voltage proportional to a magnetic field. In contrast, magnetoresistance elements change resistance in proportion to a magnetic field. In a circuit, an electrical current can be directed through the magnetoresistance element, thereby generating a voltage output signal proportional to the magnetic field.
Magnetic field sensors, which use magnetic field sensing elements, are used in a variety of applications, including, but not limited to, a current sensor that senses a magnetic field generated by a current carried by a current-carrying conductor, a magnetic switch (also referred to herein as a proximity detector) that senses the proximity of a ferromagnetic or magnetic object, a rotation detector that senses passing ferromagnetic articles, for example, gear teeth, and a magnetic field sensor that senses a magnetic field density of a magnetic field. Particular magnetic field sensor arrangements are used as examples herein. However, the circuits and techniques described herein apply also to any magnetic field sensor.
As is known, some integrated circuits have internal built-in self-test (BIST) capabilities. A built-in self-test is a function that can verify all or a portion of the internal functionality of an integrated circuit. Some types of integrated circuits have built-in self-test circuits built directly onto the integrated circuit die. Typically, the built-in self-test is activated by external means, for example, a signal communicated from outside the integrated circuit to dedicated pins or ports on the integrated circuit. For example, an integrated circuit that has a memory portion can include a built-in self-test circuit, which can be activated by a self-test signal communicated from outside the integrated circuit. The built-in self-test circuit can test the memory portion of the integrated circuit in response to the self-test signal.
Conventional built-in self-test circuits used in magnetic field sensors tend not to test the magnetic field sensing element used in the magnetic field sensor. Conventional built-in self-test circuits also tend not to test all of the circuits with a magnetic field sensor.
Some magnetic field sensors employ self-calibration techniques, for example, by locally generating a calibration magnetic field with a coil or the like, measuring a signal resulting from the calibration magnetic field, and feeding back a signal related to the resulting signal to control a gain of the magnetic field sensor. Several self-calibration arrangements are shown and described in U.S. patent application Ser. No. 12/037,393, entitled “Magnetic Field Sensor With Automatic Sensitivity Adjustment,” filed Feb. 26, 2008, and assigned to the assignee of the present invention. Also U.S. patent application Ser. No. 12/840,324, entitled “Circuits and Methods For Generating A Diagnostic Mode Of Operation In A Magnetic Field Sensor,” filed Jul. 21, 2010, and assigned to the assignee of the present invention, teaches various arrangements of coils and conductors disposed proximate to magnetic field sensing elements and used to generate a self-test magnetic field. The above application also teaches various multiplexing arrangements. These applications, and all other patents and patent applications described herein, are incorporated by reference herein in their entirety.
Typically, calibration of the magnetic field sensor must be performed when the magnetic field sensor is not sensing a sensed magnetic field, i.e., when the magnetic field sensor is not operating in its regular sensing mode.
It would be desirable to provide built in self-test circuits and techniques in a magnetic field sensor that allow the self-test function to test a magnetic field sensing element used within the magnetic field sensor. It would also be desirable to provide built in self-test circuits and techniques in a magnetic field sensor that allow the self-test all of the circuits within the magnetic field sensor. It would also be desirable to be able to perform the self-test regardless of a magnitude of an external magnetic field.
In addition to the self-test function, it would be desirable to provide a gain adjustment (calibration) of the magnetic field sensor that can occur as the magnetic field sensor operates in normal operation.